<script setup>
import { ref, reactive } from "vue";

const visible = ref(false);
const form = reactive({
    name: '',
    post: '',
    isRead: false,
})
const handleClick = () => {
    visible.value = true;
};
const handleOk = () => {
    visible.value = false;
};
const handleCancel = () => {
    visible.value = false;
}
</script>
<template>
    <a-button @click="handleClick" type="outline" size="mini">提交代码</a-button>
    <a-modal v-model:visible="visible" @ok="handleOk" @cancel="handleCancel">
        <template #title>
            提交代码
        </template>
        <a-form :model="form">
            <a-form-item field="name" label="Username" validate-trigger="input" required>
                <a-input v-model="form.name" placeholder="please enter your username..." />
            </a-form-item>
        </a-form>
    </a-modal>
</template>
  

  